package com.bci.pwtz.service;

import com.bci.pwtz.common.util.PaginationList;
import com.bci.pwtz.exception.CanNotDeleteException;
import com.bci.pwtz.exception.PwtzDatabaseException;
import com.bci.pwtz.mysql.model.Pdbyq;

/**
 * 柱上变压器服务 <br/>
 * <p>Description:<br/>
 *    <p>TODO 详细描述
 *
 * <p>For Examples <br/>
 * <PRE>
 * </PRE>
 * <p>
 */
public interface PdbyqService
{
    /**
     * 
     * 新增柱上变压器 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2014-9-16-下午2:56:16<br/>
     * <p>
     * @param pdbyq
     * @return
     * @throws PwtzDatabaseException   
     *
     */
    Pdbyq add(Pdbyq pdbyq) throws PwtzDatabaseException;
    
    /**
     * 
     * 根据变压器ID获取柱上变压器信息 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2014-9-16-下午2:56:11<br/>
     * <p>
     * @param pdbyqId
     * @return
     * @throws PwtzDatabaseException   
     *
     */
    Pdbyq load(String pdbyqId) throws PwtzDatabaseException;
    
    /**
     * 
     * 删除柱上变压器 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2014-9-16-下午2:56:22<br/>
     * <p>
     * @param pdbyqId
     * @return
     * @throws PwtzDatabaseException   
     * @throws CanNotDeleteException 
     *
     */
    int delete(String pdbyqId) throws PwtzDatabaseException, CanNotDeleteException;
    
    /**
     * 
     * 修改柱上变压器 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2014-9-16-下午2:56:26<br/>
     * <p>
     * @param pdbyq
     * @return   
     * @throws PwtzDatabaseException 
     *
     */
    int update(Pdbyq pdbyq) throws PwtzDatabaseException;
    
    /**
     * 
     * 根据柱上变压器名称，开始结束时间查询柱上变压器信息 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2014-9-16-下午2:56:32<br/>
     * <p>
     * @param devicename
     * @param beginTime
     * @param endTime
     * @param pageSize
     * @param pageNo
     * @return
     * @throws PwtzDatabaseException   
     *
     */
    PaginationList<Pdbyq> findPdbyq(String devicename,Long companyid,int portalType,String[] medLineCodes,String beginTime,String endTime, int pageSize, int pageNo) throws PwtzDatabaseException;
    
    PaginationList<Pdbyq> selectDeviceList(String stationcode,int stationdevicetype,String devicename,Long companyid,int pagesize,int pageno)throws PwtzDatabaseException;
    


    public int updateLastSyncDevice(Long companyId,String lastSyncTime) throws PwtzDatabaseException;
}
